package cn.lijiguo.concurrency.part1.ch01;

/**
 * Ticket
 *
 * @author lijiguo
 * @date 2019/12/6 15:06
 */
public class TicketWindow extends Thread {

    private final String name;

    private final int MAX = 100;

    private static int index = 1;

    public TicketWindow(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        while (index <= MAX) {
            System.out.println("窗口：" + name + "--- 叫的号码是" + index++);
        }
    }
}
